home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funframe.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  1.0 KB  |  37 lines

  1. /*
  2. \funcref{fun\_frame}{void fun\_frame ()}
  3.     {}
  4.     {}
  5.     {push(), newvar(), getopcode()}
  6.     {fun\_ret()}
  7.     {funframe.c}
  8.     {
  9.  
  10.         This function is executed when an {\em op\_frame} opcode is
  11.         encountered. Following this opcode, the number of local variables is
  12.         expected. When room for local variables should be made, a series of
  13.         variable types is expected.
  14.  
  15.         The function imitates the assembler opcodes {\em push bp; mov bp, sp}
  16.         by pushing an {\em e\_int} variable with the value of {\em bp} as {\em
  17.         vu.intval} field. If local variables should be created, then {\em
  18.         newvar()} is called to create a variable (the variable type is read
  19.         from the binary makefile) and {\em push()} is called to make room for
  20.         the variable.
  21.  
  22.     }
  23. */
  24.  
  25. #include "icm-exec.h"
  26.  
  27. void fun_frame ()
  28. {
  29.     char
  30.         nlocals,
  31.         i;
  32.  
  33.     nlocals = (char) getopcode (infile);
  34.     for (i = 0; i < nlocals; i++)
  35.         push (newvar ( (E_TYPE_) getopcode (infile) ));
  36. }
  37.